package com.tianji.promotion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.po.ExchangeCode;

/**
* @author Cammy
* @description 针对表【exchange_code(兑换码)】的数据库操作Service
* @createDate 2025-02-25 06:00:15
*/
public interface ExchangeCodeService extends IService<ExchangeCode> {

    /**
     * 调用兑换码服务的异步生成兑换码方法
     * @param coupon
     */
    void asyncGenerateCode(Coupon coupon);

    /**
     * 更新兑换码标记状态
     * @param serialNum
     * @param b
     * @return
     */
    boolean updateExchangeMark(long serialNum, boolean b);

    /**
     * 查询兑换码对应的优惠券id
     * @param serialNum
     * @return
     */
    Long exchangeTargetId(long serialNum);
}
